import { http } from "@/uni-sub-base/service/request.js"
let serviceName = "Coupon/"
import { getBaseUrl } from "@/utils/appUrls.js"
//获取用户的优惠券
export function getUserCouponDetailPage(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getUserCouponDetailPage",
        data,
    })
}
//获取可兑换优惠券列表
export function getUserCouponList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "getUserCouponList",
        data,
    })
}
//获取优惠券分页
export function GetList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetList",
        data,
    })
}
export function GetCanGetList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetCanGetList",
        data,
    })
}
//购买优惠券
export function UserBuyCoupon(path) {
    return http.get({
        url: getBaseUrl() + serviceName + "UserBuyCoupon" + path,
    })
}
//兑换优惠券
export function ExchangeCoupon(path) {
    return http.get({
        url: getBaseUrl() + serviceName + "ExchangeCoupon" + path,
    })
}
//优惠券中心-获取优惠券列表
export function GetCouponCenterList(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetCouponCenterList",
        data,
    })
}
//优惠券中心-领取优惠券
export function TakeCoupons(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "TakeCoupons" + path,
    })
}
//一键领取
export function TakeCanGetCoupon(data) {
    return http.post({
        url: getBaseUrl() + serviceName + "TakeCanGetCoupon",
        data,
    })
}
//APP活动弹窗信息
export function GetAppActivePage(path) {
    return http.post({
        url: getBaseUrl() + serviceName + "GetAppActivePage" + path,
    })
}
